package com.zhm.demo.mysql.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.hthium.json.enums.YesOrNoEnum;
import lombok.Data;

import java.io.Serializable;

/**
 * 基本域
 *
 * @author bell
 * @date 2024/01/13
 */
@Data
public class BaseDomain implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 逻辑删除 ：Y=是，N=否
     */
    @TableLogic(value = "'N'", delval = "'Y'")
    @TableField("is_delete")
    private YesOrNoEnum isDelete;

    /**
     * 创建者
     */
    @TableField("create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Long createTime;

    /**
     * 更新者
     */
    @TableField("update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Long updateTime;
}
